<template>
	<view>
		<view class="main">
			<u-parse :html="content" />
		</view>
	</view>
</template>

<script>
	import {
		getArticleDetail
	} from '@/api/app';
	import {
		getTreaty
	} from '@/api/shop'
	export default {
		data() {
			return {
				id: undefined,
				content: ""
			};
		},

		onLoad() {
			this.id = this.$Route.query.id
			this.getData()
		},
		async onShareAppMessage() {
			return {
				title: "文章详情",
				path: "/bundle/pages/article_detail/article_detail?id=" +
					this.id +
					"&share=1",
			};
		},
		methods: {
			async getData() {
				let res = await getArticleDetail({
					id: this.id
				})
				if (res.code == 1) {
					this.content = res.data.content;
				}
			}

		}
	};
</script>
<style lang="scss">
	.main {
		padding: 20rpx;
	}
</style>